#if !defined(matrix_custom_class)
#define matrix_custom_class

#include <string>
#include <cstdlib>
#include <iostream>
#include <vector>
#include <fstream>
#include "FileManager.h"
//#include "ExecuteCommand.h"
using namespace std;

#define MAX_ROWS 10

typedef vector<double> row;
typedef vector<row> vectorOfVector;

class Matrix
{
	public:
		Matrix(string matrixName,string mode);
		Matrix(string matrixName,string  mode,string pSeparator);
		~Matrix();
		void nextRow();
		double getColum(int colum);
		void getRow(vector<double>* pRow);
		bool wasLast();
		void saveRow(vector<double> pRow); 
        string transpose();
        vector<double> getRow(unsigned int pos);
		
		
	private:
		fstream matrixfile;
		vector<double> row;
	    string separator;
	    string name;
	    unsigned int currentPos;
	    bool  is_row_good;
	    void splitLine(string str);
	    void recompose(int cantArchs);
	    int decompose();

};

#endif
